iterate should check case where both keys already exist