modified findSame
modified findSanme