added support for structure return types; added corresponding test case