added find opponent function