triangle.rb in progress