add test for overlapping words edge case