
132 Pa. Commonwealth Ct. 593 (1990)
573 A.2d 1169
CIVIL SERVICE COMMISSION, Appellant,
v.
Benjamin H. POLES, Appellee.
Commonwealth Court of Pennsylvania.
Argued March 8, 1990.
Decided April 20, 1990.
*595 Andrew L. Miller, Elkins Park, with him, Ralph J. Teti, Chief Deputy City Sol., for appellant.
Malcolm W. Berkowitz, J.D. & Associates, Philadelphia, for appellee.
Before DOYLE and McGINLEY, JJ., and BARBIERI, Senior Judge.
McGINLEY, Judge.
The Philadelphia Civil Service Commission (Commission) appeals from an order of the Court of Common Pleas of Philadelphia County (common pleas court) which reversed the Commission's decision and finding of just cause for the dismissal of Benjamin H. Poles (Poles).
Poles was employed by the City of Philadelphia (Philadelphia) as a correctional officer and worked at the Philadelphia Prison System's Detention Center (Detention Center) since May 23, 1983. On September 19, 1984, Poles was assigned to the Detention Center's B-Block for the 3:00 p.m. to 11:00 p.m. shift, along with Correctional Officer Harold Stith (Stith). B-Block is a top security section of *596 the Detention Center where extreme security risk inmates are housed.
At approximately 10:10 p.m. Reginald Lewis (Lewis), an inmate, began to shout for help because the cell he was in was flooding. While Stith was in the bathroom, Poles, located in the control booth, pushed the button which opened Lewis' cell. Poles told Lewis to obtain a mop and bucket and clean up the water. While Lewis was mopping the floor, three prisoners returning from a prayer service appeared in the waiting area of B-Block seeking to be admitted. Poles admitted the three inmates thereby diverting his attention away from Lewis. When Poles turned around he noticed that Lewis was missing and sounded a general alarm by pushing a "panic button" in B-Block's control booth which alerted the Detention Center's central control office.
After repeatedly pushing the button Poles ordered the prisoners back into their cells for an immediate lock-up. The prisoners resisted. Two correction officers arrived and a fight broke out between the officers and the inmates. Shortly thereafter a team of 25 corrections officers arrived and quelled the disturbance. A head count taken after order was restored revealed that two prisoners, one of whom was Lewis, had escaped through a cell window from which the bars and glass had been removed.
On January 21, 1985, Poles was dismissed for a violation of General Order 1.3 of the Disciplinary Code of Philadelphia Prisons (Disciplinary Code) which provides that "[a]n employee shall be responsible for the efficient performance of assigned duties." Poles appealed to the Commission. The Commission conducted a hearing at which Captain Joseph T. Painter (Painter), the B-Block shift supervisor at the time of the incident, former warden Edward Jenkins (Jenkins), the warden at the time of the incident, Sergeant Kurt Osik (Osik), an officer who was on duty at the Detention Center's central control office during the incident, and Poles all testified. The Commission subsequently held that *597 Poles' negligence resulted in the successful prison break and denied Poles' appeal from his dismissal.
Poles appealed from the Commission's order to the common pleas court. The common pleas court reversed the Commission, finding insufficient evidence to support the conclusion that Poles did not efficiently perform his duties. Consequently, the common pleas court found that there was not just cause for Poles' dismissal and ordered him reinstated with back pay. The Commission then appealed to this Court.
On appeal, the Commission contends that the common pleas court erred in concluding that the Commission's decision affirming Poles' dismissal was not supported by substantial evidence and that the common pleas court exceeded its scope of review by making findings of fact not made by the Commission. This Court's review of the actions of a municipal civil service commission is limited. Where a full and complete record is made of the proceedings before a municipal civil service commission a reviewing court must affirm the adjudication unless it is in violation of the constitutional rights of the appellant or not in accordance with law, the procedural provisions of the local agency law are violated or a finding of fact of the commission necessary to support its adjudication is not supported by substantial evidence. Section 754 of the Local Agency Law, 2 Pa.C.S. 754; Tegzes v. Township of Bristol, 504 Pa. 304, 472 A.2d 1386 (1984).
The Commission contends that the common pleas court erred in concluding that the Commission's determination that Poles was inefficient in the performance of his duties was not supported by substantial evidence and thus just cause existed for his dismissal.
The criteria for determining just cause must be based on merit. The standards must be job-related and in some rational and logical manner touch upon competency and ability. Brengle v. Department of Public Welfare, Lancaster County Board of Assistance, 81 Pa. Commonwealth *598 Ct. 584, 474 A.2d 352 (1984). All that just cause requires is that the cause for dismissal not be religious or political, but concerned solely with the inefficiency, delinquency or misconduct of the employee. A wide latitude must be left to the superior officer. This discretion must be conditioned on its exercise in good faith and not as a screen for some reason not based upon the fitness of the employee to fill the position. O'Gorman Appeal, 409 Pa. 571, 576, 187 A.2d 581, 583 (1963).
In this case the Commission made the following findings of fact:
Appellant did not fulfill his responsibility to check all the cells in the block during the shift; his doing so would have permitted him to discover that the bar or grate on one of the cell windows had been broken or sawed off and would have given him the opportunity to prevent the escape. Appellant was specifically assigned to a high security block. He did not know who were priority risks and so randomly tagged some of the cells as high risk without being certain of his decision. He then let an inmate out of the cell without being sure of that inmate's status. This was done in direct violation of security rules. Appellant was in a position to have simply contacted Center Control when the cell flooding developed and asked for additional help to assist in the clean-up or in the supervising of the inmates to do the clean-up. Instead, appellant decided to act on his own. Appellant's behavior and negligence resulted in a successful prison break.
Commission's Decision, November 21, 1985 at 3.
In light of Brengle and O'Gorman, we must conclude that these findings are sufficient to support the Commission's determination that Poles was dismissed for just cause. The Commission's findings are clearly job-related and touch upon Poles' competency to perform his work duties.
With regard to whether the Commission's findings were supported by substantial evidence, the substantial *599 evidence required to support the finding of an administrative agency must be such relevant evidence as a reasonable mind might accept as adequate to support the conclusion. Gallagher v. Philadelphia Civil Service Commission, 16 Pa. Commonwealth Ct. 279, 330 A.2d 287 (1974). A reviewing court will examine, but not weigh the evidence since the fact-finding tribunal is in a better position to find the facts based upon the testimony and the demeanor of the witnesses. The court may not substitute its judgment for that of the agency.
It is the prerogative of the Commission to determine the credibility of witnesses and the value of their testimony. Id., 16 Pa. Commonwealth Ct. at 282, 330 A.2d at 289. A review of the record indicates that Poles' testimony regarding the September 19, 1984 incident and former Warden Jenkins' testimony regarding proper procedures in the Detention Center's B-Block provide substantial evidence for the Commission's findings.
We agree with the Commission's contention that the common pleas court exceeded its appropriate scope of review as set forth in Section 754 of the Local Agency Law, 2 Pa.C.S. § 754 by making its own findings as to whether Poles' conduct was negligent. Accordingly, we reverse the order of the common pleas court and reinstate the decision of the Commission.

ORDER
AND NOW, this 20th day of April, 1990, the order of the Court of Common Pleas of Philadelphia County in the above-captioned proceeding is reversed and the decision and order of the Philadelphia Civil Service Commission is reinstated.
