tighter checks on r and s