fixed bug in test set code