fixing waiting, adding logs