export a function to be consumed by JS