complete assignment2 programming