replace HashSet by ArrayList