added notes in the js