modify the verify function