switched to named result parameters to improve readability

not entirely sure this is actually better in all of these cases - particularly
when relying on implicit return values