clarify how remainder is calculated