code intend refactoring