Extract version method to make it more readable