method calls method on a parameterized class