moved sorting tests