How does carbon dating works