removed all the old locking code; use merge