http://www.cs.tlu.ee/instituut/opilaste_tood/magistri_tood/2009_kevad/mart_sinimaa_magistritoo.pdf