In-place merge implemented