build js file and worte a wrapper around it