fast remainder operation