implementing read_source