updated to support RemoteSecurityGroup