undefined vars at top