better sequence handling