refactored to use core.common._is_sequence