correct xml generation