more optimizations
Merge pull request #3 from m-schrepel/master

further optimizations