relocate WaitBar and refact WaitBar api