adaptation for new Sample construction