pymagor explanation taken from wiki