Adding assignment 5 solution