refactor filepath