the original story for this episode featured a non-lookalike female android who was intended to be a love interest for data. the new android was intended to have been created as something that could be deployed into dangerous or hazardous situations, described in the premise as something along the lines of a female android version of red adair, the fire fighter. the "evil twin" story was suggested by brent spiner, instead, and was originally developed to include the creation of data by an alien race. this was instead dropped and dr. noonien soong was introduced. soong was named by gene roddenberry after his second world war friend, kim noonien singh, who the character khan noonien singh was also named after. it would be roddenberry's final script credit on a "star trek" series. the script made mention of isaac asimov and the laws of robotics, something which had been suggested should be included at some point in the show as a spoken credit in a memo dated october 28, 1986 from executive producer bob justman. the episode suffered delays during pre-production caused by re-writes to the script, resulting in the script being switched with "the big goodbye", which meant that director joseph l. scanlan went on to direct that episode instead. rob bowman, who had previously been told by justman that he was going to direct "the big goodbye" after his work on "too short a season", was instead assigned to direct "datalore".