added in-code comments