added wait method working

added wait method working