slight rework of read functions
added unit tests for reading D and QC files