updated the readXPath function with div[1]