triangle validation program