improved ordering for tasks