Embryo of sorting algoritm