Trace elements and isotopes in sedimentary carbonates