modified for new js file