edited saving code so that it batches with fallback