solved triangle errors