remove total from database, add to calculations