replace mod by modulo (r5rs, not r6rs)