add calls to modulo op to avoid overflows (bis)
v0.1.2