added --primaryName option