  We present a new model for the creation of \J mesons in ultrarelativistic
heavy ion collisions, which allows to follow the individual heavy quarks from
their creation until the detector through the Quark Gluon Plasma (QGP), which
is formed in these collisions and described by the EPOS2 event generator. The
\cc quarks interact via a potential, based on results of lattice gauge
calculations. The annihilation and creation of \J is described by a density
matrix approach whose time evolution is studied in the expanding system. The
comparison with PbPb data at $\sqrt{s}$=5.02 TeV shows that this model can
describe simultaneously the nuclear modification factor $R_{AA}$ and the
elliptic flow $v_2$ of the \J at low transverse momen
