There are a couple of threads about how. The most important part is to not allow the cam chain to slip on the cam sprockets, which has happened. Otherwise, fairly simple and fast to change the CCT if you have any mechanical background at all.
If the rattle continues, the chain may've stretched, which is not massively expensive in parts, but is a more complicated job.