added createNewMachine() functionality, added missing  imports