How does weathering relate to the rock cycle?