Updated multipool and pool js logic