Added assertions and a new case