refactor func buildSelectStr()