code optimization
Merge pull request #3 from lysenkobv/patch-1

code optimization