What has to happen first for sedimentary rock to form?