idiom for different implementations of same idea