Added support for multiple output variables