logic in taskbroker