added wait cycle