Iran trying to deal with extremism, terrorism in Afghanistan