run commands in subshell