added functionality so that the verify returns the id