updating js for final page