changed macro constants to typedefs