implemented methods makeCacheMatrix and cacheSolve