add a certinfo method and refactor'd