added functionality for makeCacheMatrix and cacheSolve