studied the javascript with simon and commented statements to understand them