simplify argument handling, thx @rnewson