cachematrix.R - my code