Changed VerifyInputs to use matrix arguments