completed script for generating test data