updated with today's work on hw5 with Xiaohu