add select function, draw two kinds of viz