Community detection in complex networks using structural similarity