offline sampling