Fixed: in and out are actually returned, not modified as references.