Added some comments
changed a name to be consistent with lectures