sorting only with two elements