add support for resuming from a particular record