moved some const defs to avoid redefinition