moved wait into class __init__ method.