make struct dir_contents more dynamic