added findcommunities() function