export some work out of reqhandler