replace fromCollection with fromElements; remove unused import