Created function to generate test data