http://aid.aiistudentwork.com/pl/09fa_logic/amigh_m/wk10/wk8assignment1.html