moved waitForEither to utils, config (CFG) is global