use bounds checked version of all external functions