removed unneccissary getDirectory