WIP: custo sort function.