refactor cdv reading logics