working tree demo, but program is slow for large number of insertions