refactor to require less files