adding xml handler code