allow directory string to be passed in as previously