new: longest common prefix