first usable version - wait.for based on generators