add double read code
clean up at cost of some unit tests