added isinstance of tuple