better initial security group merging