detect globals