how to compute remainder - Search