add wait when done