added update method to player