hw4 part-2 initial version