reading from a directory works