add check for duplicates