changed from exception to assert