changed how session variables are changed
fixed typo