This shows segment tre implementation and use of multiplicative inverse :)