removed uneccessary function
added functionality to save variables to hash