setting and getting variables and updating