split version detection into methods

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