improve stability of example 2 by not writing commands as many  so fast