improved obstacle detection