added support for whole-word commands (as well as partial-word)