cachematrix functions - more comments added