added triangle support