changed backfill to use contextmanager