script for drawing primaries