add prefix tree implementation