improve performance
some more performance improvements