switched static vars to #define