adding cursor and record type