implemented promises and incorported game logic into calculations for storing fitbit data to db