saveSample method eliminated and added one more efficient