match layout of Perl API more (easier drop-in replacement)