Updated the cacheMatrix code for submission