js to update timetable