added batching. Dan is a frontend dev and can't actually code.