extract community_ids method
memoize cities rather than community_ids