sort of works. has to merge generated xml back in by hand