remove duplicated code from game object