required data input in handlers, refactoring