train and testset code created