add condition for existing records