find contiguous sequence