isExcluded function added