Added functionality for tasks ordering.