fix script to generate samples