pid for ags
insert pool inside batch