properly allow for subdirectories