Extracting ids.