refactoring handlers
refactoring handlers