updated gameobject creation and deletion logic