replaced prefix_tree variant with record type