first working version of reseting the state on page refresh
renaming