added solution to programming assignment 2 in cachematrix file