Working sort method, with INT arrays