change all cmd to variable cmd