updated reader and writer interface