refactor the path