use new Collection<T> template instead of Sequence<T>