renamed some globals