my assignment2 solution