use batchinfo in general

This fixes #4 and #5 and is a better idea overall.