hardcore optimizations