I've add some small comments in the code