communities function

Construct communities from individuals