major performance improvements