modified writer, not flexible yet