more realistic code added to reader.c