some comments added in the code