add complete code for dot cmd