sort planets properly