Code to create a validation set