crude xml writer implemented