Added comments for readability, and understanding.