added completed functions to cachmatrix.R