added more code comments