changed systemSize to N