Get Next Sample functionality added