very primitive decision tree for string building