make method generic.