removing accidentally global variables