for triangle.rb had to use the hint