Extracted getVersion method