Changes to correct the method nameExists