added shortest path detection (reverses drive motor instead of rotating 180)