better xpath generator