solution to assignment.