add function to replace var in do
 add do list to instruction