Implemented powerMod (maybe?)