new record selection code