Better way of detecting version
Merge pull request #2 from vnivargi/master

minor tweak to detect version