updated reader.c