update dynamiCls and function writeDynamic