added duck typing support, now files or lists