modified createList(string) to a templated class