added wait command mechanics