Trik2 function

Improved TRI (with differences of order 2), reducing/removing slope dependence (for testing purposes)