commented the code further