a lot of performance improvements