THIS IS THE GATEWAY PROCESS