optimized performance a tiny bit.