reorder tasks for a better fit