added functions in cachematrix.R