refactor to use file readers