making global vars extern