sequence implementation produces vectors where possible