Completion of hw4