added functions bodies in cachematrix.R