completed functions in cachematrix.R