constrain some type parameters to be numeric