add dispatch method in order to add handlers in front