adding solution to hw2 and challenge3 test