do refactor