add fieldWriter to support nested fields