custom dedupe queries + making custom queries manageable from UI