cachematrix.R updated with code for functions