OPINION OF THE COURT
This appeal is from an order of the district court denying Soyka’s petition for a writ of habeas corpus. At the time the petition was filed, Soyka was an inmate at the federal penitentiary at Lewis-burg, Pennsylvania, in the custody of the respondent, serving two sepárate sentences imposed by the United States District Court for the Southern District of New York.1 The writ was filed, pur*304suant to 28 U.S.C. § 2241, in the Middle District of Pennsylvania, seeking credit toward his second sentence for what is claimed to have been time spent in custody prior to sentencing “in connection with the offense or acts for which sentence was imposed.” 18 U.S.C. § 3568.
We need not recite the facts surrounding Soyka’s claim for we are of the opinion that the merits of the case can not be adjudicated at this time. Our inquiry at present is limited to questions involving the jurisdiction of this court: (1) Is Soyka’s claim cognizable solely in the court which sentenced him under 28 U.S.C. § 2255? (2) Must Soyka exhaust the administrative remedies available to him?
Soyka’s Section 2241 petition claims credit for time spent in custody pursuant to 18 U.S-.C. § 3568. Section 3568 provides, in pertinent part:
The sentence of imprisonment of any person convicted of an offense shall commence to run from the date on which such person is received at the penitentiary, reformatory, or jail for service of such sentence. The Attorney General shall give any such person credit toward service of his sentence for any days spent in custody in connection with the offense or acts for which sentence was imposed.
It is asserted by respondent that in seeking credit for pre-sentence time spent in custody, Soyka is attempting to have the court determine the commencement date of the sentence, and that, so viewed, he is attacking the correctness of his sentence. Therefore, the argument runs, Soyka’s exclusive remedy is in the sentencing court by way of a motion to correct sentence under 28 U.S.C. § 2255.2
We are of the view that Section 2255 is inapplicable, for the essence of Soyka’s petition involves the computation of time served on his sentence.3 Rather than collaterally attacking the sentence, he merely seeks a determination that certain time spent in custody should be applied to the sentence the validity of which is not in question. See Comulada v. Pickett, 455 F.2d 230 (7 Cir. 1972). If Soyka were to prevail on the merits, the credits would apply against the sentence as imposed — they cannot be implemented by tampering with or correcting the sentence itself. See Lee v. United States, 400 F.2d 185 (9 Cir. 1968). The ease at bar is thus akin to the primary historic use of the writ of habeas corpus as embodied by the Constitution as well as 28 U.S.C. § 2241,4 for Soyka’s attack is upon the legality of his future detention based on the claim that respondent threatens to *305hold him beyond the expiration date of his sentence.5 Compare Zaffarano v. Fitzpatrick, 404 F.2d 474 (2 Cir. 1968), cert. denied, 395 U.S. 977, 89 S.Ct. 2130, 23 L.Ed.2d 766 (1969), and Comulada v. Pickett, supra.
Moreover, in providing that the Attorney General, not the court, is the one to grant credit toward service of a sentence, 18 U.S.C. § 3568 makes it clear that the giving of credit is an administrative, not a judicial, responsibility and is unrelated to the sentencing process. Bostick v. United States, 409 F.2d 5 (5 Cir. 1969), cert. denied, sub nom. Lainhart v. United States, 396 U.S. 890, 90 S.Ct. 180, 24 L.Ed.2d 164 (1969). As was stated in United States v. Lewis, 145 U.S.App.D.C. 93, 447 F.2d 1262, 1265 (1971), “The mandate and operative scheme implicit in the statute provides that the available credit shall be applied after whatever sentence is imposed and not before sentence. Thus, the court must first impose sentence before any ‘credit’ may be realized.” (Emphasis in original). In short, a motion for credit of time calls for the computation of the service of a legally rendered sentence and is not directed toward the sentence itself so as to be cognizable only under 28 U.S.C. § 2255.
Respondent maintains that our decision in Sobell v. Attorney General of United States, 400 F.2d 986 (3 Cir. 1968), cert. denied, 393 U.S. 940, 89 S. Ct. 302, 21 L.Ed.2d 277 (1968), is to the contrary. While it is true that Sobell held that the claim for pre-sentence credit sought relief which was “within that provision of § 2255 which permits the sentencing court to ‘correct the sentence,’ ” 400 F.2d at 988, Sobell is distinguishable from the case sub judice in that Sobell was sentenced on April 5, 1951, prior to the time that Congress removed the function of granting credit for pre-sentence custody from federal courts to the Justice Department. In 1951, 18 U.S.C. § 3568 contained no provision for the Attorney General’s allowance of such credit, and it was the general practice of sentencing courts, in the exercise of their discretion, to provide defendants credit against their sentence for time spent in custody for lack of bail.6 Since the decision to grant or not to grant Sobell pre-sentence credit was made by the sentencing court as part of the sentencing process, and since Sobell sought to question that determination, this court properly determined that So-bell was attacking the correctness of the sentence as imposed. Soyka, on the other hand, seeks credit against a sentence imposed on October 24, 1969, well after passage of the Bail Reform Act of 1966, 18 U.S.C. § 3568 (1970).7 He does not question any decision or ruling pertaining to his sentencing, but rather chal*306lenges a subsequent decision allegedly-made by respondent acting as agent for the Attorney General. Respondent’s reliance on Sobell is thus misplaced.
Respondent’s argument that United States v. Gaines, 436 F.2d 1069 (2 Cir. 1971), vacated, 402 U.S. 1006, 91 S.Ct. 2195, 29 L.Ed.2d 428 (1971), on remand, 449 F.2d 143 (2 Cir. 1971), establishes that a § 2255 motion “to correct sentence” is appropriate is also without merit. Although Gaines proceeded under § 2255 to obtain credit for pre-sentence custody, the issue whether habeas corpus or § 2255 was the proper remedy was not suggested or decided. Questions “neither brought to the attention of the court nor ruled upon, are not to be considered as having been so decided as to constitute precedents.” Webster v. Fall, 266 U.S. 507, 511, 45 S.Ct. 148, 149, 69 L.Ed. 411 (1925).
Having concluded that Soyka instituted the present proceeding in the court of proper jurisdiction, we nevertheless find that he did so prematurely. As we have said, 18 U.S.C. § 3568 requires the Attorney General to give credit administratively for pre-sentence jail time served in connection with the offense for which sentence was imposed. Before Soyka is entitled to relief by way of habeas corpus, it must first appear that the Attorney General or the Director of the Bureau of Prisons has refused to afford him credit to which he is legally entitled. See Pace v. Clark, 453 F.2d 411 (5 Cir. 1972); United States v. Morgan, 425 F.2d 1388 (5 Cir. 1970); United States v. Sanders, 272 F.Supp. 245 (E.D.Cal.1967). See also, Smoake v. Willingham, 359 F.2d 386 (10 Cir. 1966). The record reveals that Soyka applied unsuccessfully to an officer of the prison, D. W. Storer, in this regard. However, Soyka did not seek to have Storer’s denial of credit reviewed by the respondent, Warden Alldredge, nor did he appeal to the Central Offices of the District Director of the Bureau of Prisons.8 There are no circumstances present which suggest that the Attorney General will fail to perform his duty and grant credit where it is warranted. Soyka should therefore exhaust the administrative means at his disposal before judicial review will be appropriate. For example, “[u]nder the regulations promulgated by the Bureau of Prisons, there is available to all prisoners, the right of the ‘Prisoner’s Mail Box.’ This procedure sets up an effective means of review of actions of local prison authorities.” Green v. United States, 283 F.2d 687 (3 Cir. 1960). See also Pace v. Clark, supra. Since the authority to review the computation of sentences is vested in the Central Office of the Bureau of Prisons, the appropriate remedy available to Soyka is to utilize the Prisoner’s Mail Box to request from it a proper administrative determination of credit.9
The district court, by its order of March 6, 1972, rejected respondent’s argument vis á vis exhaustion of administrative remedies stating, “The cases cited by Respondent . . . are inapposite because the inmate-petitioner in those cases alleged abuse of discretion by the Warden. In the matter presently before the court, 18 U.S.C. § 3568 indicates that the Warden (as representative of the Attorney General) does not have to exercise any discretion.” We disagree that the absence of discretion under § 3568 is a significant factor. The Justice Department, Bureau of Prisons, is directly responsible for administering Section 3568 and has the power to review any action taken by local prison of*307ficials whether that action be discretionary or mandatory. It is preferable to have allegedly erroneous decisions corrected at the administrative level, so that the facts can be better investigated, the Bureau’s expertise brought to bear, and the limited time of courts conserved.
For the reasons stated, the case will be remanded to the district court with directions to dismiss the petitioner’s writ of habeas corpus.