adds getVersion() method in main class.