refactor to introduce walker