finished implementing merge functionality