Updated version of cache matrix.R