start of a reading function