refactor merge for simplicity