refactor the file