improve xml by splitting off the huge convert method