Update comments for understanding the code