Using directory.rb and indexing it for practice