Add wait method
Modify source script