a bit of refactoring before version pick command