Rewrote comments for better clarity