some optimization improvements
more improvements