NameException - Changed positioning of the private method