assignment2 solution