added helper methods to directory object