added method to parse version from string