check globals declared
check locals declared

Make sure all globals defined & then check locals
