added empty dir case to try3.rb and a bit of refac