Extract findFirstWall method