added getDirectory methods