finalized xml spike, now it works as it should