add triangle problem