wait for initialization