Added hash and updated block to directory.rb