Add mod operations to user and context