triangle.rb almost done