new idea and refactoring