implemented Triangle