added comments to directory.rb