some hard-code optimizations in header