sameline fixed and works on more than 2 entries