added get opponent logic