Added some additional functions for updating the database when a bet occurs
fixed conflicts