Use I(p) - I(1-p) instead of I(p*2)
Use
I(p) - I(1-p)
instead of I(p*2)