added identical check to cacheMatrix set function

additionally, more comments were added