use handlerFactory to init handlers, makes it more flex