added a wander function to the enemy AI