updated with notes in JS