added constructor for xml call