a function to find out the same fragment