implement a separat wall finding algorithm