changed some of #define to const