adding and updating create_sample functions