Func mod

Added in modular arithmetic support