added custom triangle drawing functionality