do nothing when requested to swap an element with itself
no need to compare element with itself when selecting min
improve general readability