Yer I have the kind of feeling this is going to go well or be very painful.
So I cant find any detailed example that explains this well , if someone would be able to just show me how it works with an example of code that calculates for example d = inverse multiplicate modulus of x(mod d)