added a get cookie method, defined message function for prg