code for hallway.rb