simpler remove of duplicates
use QMessageBox to show errors