made assert more general