changed interface to take a class parameter instead of a bool parameter