Extracting some duplication