save refactor