assignment 2 from Jianming Zhou