refactor and fix conflicts