Added MOD function.