Implemented function to update teams and players