refactored to avoid reaching API batch request limit; go fmtd