add batch check to lib