flexible domains - beginning
flexible domains - step 2
first sorting implementation - faulty