update bfser to support subgraph constructing