Update cachematrix.R

updated with changes for assignment - 05.23