changed to use of globals for global constants