add necessary wait function in lib module