refactor the first