added wait.h library to work in well