makeCacheMatrix function written