Altered the prg to take more arguments such as port number and secret keys