setting up state for merge