added the statistic service and changed the way the tasks are assigned to agents by the least occupied agent,