check for curly braket before replacing with AA cose