flatten so it includes directories