LPM tree implementation