coerce function return types