redesign xml read write