cleaning up main request handling