epic refactor