changed triangle logic

roy