better handling of some return types