clean refactor