updated the cachematrix.R file to include the changes as required by the assignment