added untested obstacle avoidance