removed duplicating #define and used a header file to replace them.