verify function