added support for optional request parameters