completed brute force maze counting working correctly