refactor overhaul