first stage of diff refactor