refactored update standings function