delete and refactoring