fixing waiting time