Comments added

To explain the purpose of four temp variables.