How was the solar system formed?