main() is the same for every single sort, so make it a template