fix the logic. use isValid to check if the verify failed or not.
verify method should not return anything.