waiting time problem