discarded the exists test to improve performance

used on duplicate key instead