added merge_with def