redoing the javascript. step 1