Read ass2.pdf for details.