added methods for community detection