cleaner format setup, rename sort functions to compare