updating js file to work with BS3