added support for sigmoid / tanh control + testing on both training and test data