main: this should be sorting now, but it's not and I'm not sure why