refacturing version parsing