move some constants into macros