proximity sort