added the functionality for supporting toggling of methods