added assert staetement