implemented triangular test