updates so error is thrown when imbalenced input is entered