moved fetching versions to separate method