Added support for exec() and cmd() methods