added wait condition for front-end