plug nice refactor