finish longest common prefix fix issue #13