Modified hw2-4 and hw4-3