small changes to use validation set for BW