triangle is now a class