renamed ambigously named variable max to currentlcpmax