added option to pass a command to pi