double buffering
merge