relinted, added globals