edited to add comments