correct the code for producing the right dataset