optimizations n' stuff