A sort algorithm I'm working on