Fixed bug, but outArr isn't being sorted