mongo tries for templates