wrote code for makeCacheMatrix and cacheSolve functions