more optimizations. hopefully this will be enough.