first two elements in array switch if first is larger that second but still need to fix all the rest