Is there any highly time consuming function involved? Or is the execution time of the internal functions even a problem? If not I woulf suggest to beartyoe the whole package to make it much easier to catch wrong input.