modified thread wait