
521 So.2d 953 (1988)
Roger HANSON
v.
Thomas K. HEARN, et al.
86-925.
Supreme Court of Alabama.
February 12, 1988.
Edward Still and Susan Williams Reeves, Birmingham, for appellant.
Ina B. Leonard, Birmingham, and Robert L. Potts and C. Glenn Powell, Tuscaloosa, for appellees.
JONES, Justice.
This is an appeal from a judgment construing a 1980 consent judgment to which Dr. Roger Hanson and Thomas K. Hearn and other agents and employees of the University of Alabama at Birmingham were parties.
Hanson sued the University of Alabama at Birmingham (UAB), alleging that his removal as dean of the School of Natural Sciences and Mathematics (NSM) deprived him of due process of law in violation of 42 U.S.C. § 1983, and the Constitution of the State of Alabama. A consent judgment, effecting a settlement of the parties, provided in pertinent part:
"2. The plaintiff will be transferred to a senior academic position with administrative responsibilities. The position shall be equal in prestige, pay, and responsibility to that of the dean of Natural Sciences and Mathematics. The parties will mutually consult and decide upon an appropriate position for the plaintiff not later than September 1, 1980. This position shall be outside the University College....
"3. The plaintiff's salary shall be increased from time to time comparably to *954 that of persons of similar rank, status and responsibility.
". . .
"7. Other than as provided in this decree, the status and position of the plaintiff shall be governed by the same rules, regulations, handbooks, practices, and procedures as other persons holding academic administrative appointments."
After the entry of the consent judgment, Dr. Hanson was transferred to an administrative position in the Medical Center, with the title of director of coordinated curricula for the basic allied health sciences.[1] As director, Dr. Hanson was initially paid the same salary he had been paid as dean; his salary each year after the transfer, however, was set by the senior vice president for health affairs, Dr. C.A. McCallum.[2]
In determining the salary of an individual, Dr. McCallum reviewed the salary history of the individual and the salary range for the position, if a range existed and was applicable. Additionally, Dr. McCallum considered the "productivity of the individual" and "his accomplishments as they relate to other individuals." In sum, he followed university policy, which was that salary evaluations were to be based on individual performance. Although no administrator in the University College participated in Dr. Hanson's salary decisions, the University College made a lump sum transfer each year to the Medical Center to fund his position.
After his retirement in 1985, Dr. Hanson learned that his salary as director of coordinated curricula during his tenure in the position had been less than that of the deans of natural sciences and mathematics, business, engineering, and social and behavioral sciences in the University College; it had been more, however, than the deans of humanities and education in the University College.
Dr. Hanson's suit complained that the consent judgment required UAB to pay him equally with the dean of NSM, or comparably with other deans in the University College if there was no current dean in NSM, and that UAB had ignored the judgment's "special procedure and standard" for setting his salary. He sought a retroactive revision of his salary and retirement benefits, or, alternatively, an award of the difference between his salary and retirement benefits as paid and his salary and retirement benefits as alleged.
The trial court found that, in his position as director of coordinated curricula, the "Plaintiff's salary was regularly and routinely reviewed and he received salary increases on a regular basis. All of this was done in accordance with the standard policies and procedures of the University." The court further found that the percentages of Dr. Hanson's salary increases were consistent with those given to other UAB employees in positions of similar status.[3] The issue now before this Court is whether the trial court properly construed the provisions of the 1980 consent judgment.
Judgments are to be construed like other written instruments. Schwab v. Schwab, 255 Ala. 218, 50 So.2d 435 (1951). Specifically, a consent judgment is in the nature of a contract or a binding obligation between parties and can be set aside only upon a showing of fraud or mistake. Price v. American National Bank of Gadsden, 350 So.2d 328 (Ala.1977). Rules applicable to the construction and interpretation of contracts are applicable to the construction and interpretation of judgments. Thus, in *955 construing a consent judgment, the intention of the parties derived from the judgment itself controls if its language is plain and unambiguous. See Southern Housing Partnerships, Inc. v. Stowers Management Co., 494 So.2d 44 (Ala.1986).
The general principle of interpretation is that the court is free to look to all the relevant circumstances surrounding the judgment. In other words, the entire judgmentall provisions consideredshould be read as a whole in the light of all the circumstances as well as of the conduct of the parties. See Quick v. Campbell, 412 So.2d 264 (Ala.1982). The court is thus able to better determine the intent of the parties; and "if the principal purpose of the parties is ascertainable, it is given great weight." Restatement (Second) of Contracts § 202(1) (1981).
Considering the facts of the instant case, we believe that the trial court properly construed the judgment; thus, we affirm its decision.
Paragraph 2 of the judgment states that Dr. Hanson was to be "transferred to a senior academic position with administrative responsibilities" and that the new position would "be equal in prestige, pay, and responsibility to that of the dean of Natural Sciences and Mathematics." Dr. Hanson appeals only as to the issue of pay. The judgment in this respect is ambiguous: Was Dr. Hanson's new position at the university to carry a salary "equal" to that of the dean of NSM at all times in the future or only at the time of his appointment to the new position, with future salary determinations to be governed by university policy? Paragraph 3 of the judgment states that Dr. Hanson's salary was to be "increased from time to time comparably to that of persons of similar rank." And paragraph 7 of the judgment allowed Dr. Hanson's "status and position" to be governed by university policy unless provided for otherwise.
An interpretation of the judgment that gives meaning according to its entirety is favored over one that makes some part of it mere surplusage. See Schwab v. Schwab, 255 Ala. at 222, 50 So.2d at 438. If paragraph 2 was intended by the court to govern future salary increases and to establish a minimum salary for Dr. Hanson, then paragraph 3 would be rendered meaningless. Thus, reading paragraphs 2 and 3 together, we favor the interpretation that Dr. Hanson's new position at the university was to carry an initial salary "equal" to that earned by him as dean of NSM. The judgment did not say that his salary would at all times in the future be equal to that of the dean of NSM.
From Dr. Hanson's removal as dean of NSM in 1980 and until June of 1983, the deanship of NSM was vacant and the school was administered by an interim dean. Dr. Hanson argues that his salary during this period should have been comparable to that of other deans in the University College, pursuant to paragraph 3 of the judgment. Paragraph 3, however, speaks specifically to salary increases and not to the establishment of either a minimum or a base salary for Dr. Hanson.
In fact, Dr. Hanson's brief indicates that the percentage of increase in his salary between October 1980 and December 1984 was less than that of the deans of business and English, but more than that of the deans of humanities and education and about equal to that of the dean of social and behavioral sciences. Between June 1983 and December 1984, Dr. Hanson's percentage of increase in salary was less than that of the dean of natural sciences and mathematics.
Based on this record, we agree with the trial court's finding that UAB complied with the requirements of paragraph 3 and did so in accordance with university policies and procedures pursuant to paragraph 7 of the judgment.
The trial court, having received ore tenus testimony, will not have its judgment disturbed on appeal unless it is unsupported by competent evidence or is plainly erroneous or manifestly unjust. Roberts v. Peoples Bank & Trust Co., 410 So.2d 393 (Ala.1982). Looking to the subject matter of the consent judgment and the evidence of record, we cannot agree that the purpose *956 of the judgment, as maintained by Dr. Hanson, was to "curtail the defendants' usual discretion in setting pay" for him and to exclude "subjective considerations such as merit." Therefore, the judgment of the trial court is due to be affirmed.
AFFIRMED.
TORBERT, C.J., and MADDOX, HOUSTON and STEAGALL, JJ., concur.
NOTES
[1]  UAB is divided into two primary academic units, the University College and the Medical Center, which are administered by the senior vice president for the University College and the senior vice president for health affairs, respectively. Each division is divided into schools headed by deans. Dr. Hanson was dean of the School of Natural Sciences and Mathematics in the University College from 1973 to 1980. At the time of the lawsuit, Thomas K. Hearn was senior vice president for the University College.
[2]  Dr. McCallum was named President of UAB on April 2, 1987.
[3]  Judge William C. Barber of the Jefferson County Circuit Court heard oral evidence and received depositions into evidence, but died before reaching a decision in the case. Judge Jack Carl assumed responsibility of the case; the parties filed a written transcript of the oral testimony and submitted the case to Judge Carl for decision.
