Implementation of fetchBefore