got wait condition working.