implement command switches

-implement command switches to allow correct execution of methods for
different command keys