comments added around the code