adding support for passing commands as an array of strings