improve comments throughout the code