add ample code comments