add waitfor helper