refactor guide