tweak export API to avoid calling private methods in test