function c=remm(a,b)
        if rem(a,b)~=0 c=rem(a,b);
        else c=b;
        end
