use request object instead of query param