revising methods to use xpath