Finish homework 3 from fall 2013

Homework 3 is not released yet, so play it from last year.

Signed-off-by: kfei <kfei@kfei.net>