added helpful code comments