detect out of scope variables