adding performance improvements