fixed bug for setting random in program, created setCookie method and
removed hard coded cookie setting. All debug statements have been
removed