wrote code for makeCacheMatrix and cacheSolve