edited to include comments