now with duplicate label detection