split version detection into methods

- [x] split version detection into methods
- [x] add tests for different version outputs