algorithm for detecting community in social network