combine two look-like functions