Using generics; replacing Vector with List