add global var, removed blocking calls