add solution to assignment 6.