added `merged` function