should handle sequence, not only list