State machine
merge