extracting method
adding method to find matching pieces