completed functions for week 2 assignment

make cached matrix and solve from cache