finished the assignment2