added support for multiple returns