handle refactor