add api method, squelch encode warning in debug code