move common methods to GameObject class