wrote function to get test data