removed unnecessary variable and added some comment to the code