rework to sample earlier