add methods and set session and variables