Updated the cachematrix.R to make functional