refactored the walker to be an class