support for typed return values, and for optional parameters