added getfromagents method