4.0 rewrote run_shell with better timing blocks