added ability to register handelers for different url