Added merge functionality