Daigo Tanaka's solution on the assignment (first commit)