first attempt at writing the cachematrix.R functions