add validation for n cases