change newClass to Triangle