added NATIVE sort logic