small performance improvements