fixes for return types, arrays