fully functional js file