sum modulo problems