delete refactor