added ability to pass command as a string