update players function