refactor code to find data files (#114)