start 1-wall algorithm