refactored rset