[Completion of assignment 2]
working cachematric.R file