refactor conflict handling
refactor conflict handling (cont'd)