notes for modPow