move the function sort range to its own file