replace #define to const