updated js file for new layout