added comments and fixed a bad comment in the code