few performance improvements