added some general code comments