Fixed non-unique generic parameter type by using list instead of set