removed session variables and made the program stateless.