modified communities.py