implement better walking logic