hack to use the upper bound as the class of a type parameter