copied changes from enemy branch