chamber in the building. The stairs continue to give access to the parapet walks around the stone-flagged roof. A further storey was added to the jamb in the sixteenth century, containing a single chamber. The exterior of the castle formerly had two timber balconies, or viewing platforms, one overlooking the gardens to the south, and one looking east across the Lothian countryside. The inner courtyard The mid-15th-century curtain wall encloses a courtyard around across, and is up to thick. Externally, the curtain wall measures by . Round towers are located at each corner, with a postern, or side gate, located at the base of the south-east tower. The towers have keyhole-shaped gun holes, intended for decoration as well as defence. The round-arched gate is in the north wall. Over it are the arms of the Preston family, with the royal arms of Scotland above. The walls are defended by machicolations, spaces through which missiles could be dropped on attackers, and battlement walks give access to the entire length of the wall. On the inside of the wall, traces of windows suggest that there was once a south range of buildings in the courtyard. There is no well in the courtyard, but a stone trough runs through the curtain wall, allowing water to be brought into the castle. The east range The east range occupies the south-east and east sides of the inner courtyard. The original east range, contemporary with the courtyard wall, was rebuilt in the 16th century and linked to the tower house by a new, broad spiral stair. The building at the south-east adjoins the tower house, and comprises two chambers on the first floor. Cellars below were occupied by a bakehouse and a possible prison. A corridor connects the tower to large, vaulted kitchens in the east range, also accessible via a straight stair from the courtyard. Another depiction of the Preston family arms, supported by monkeys, appears above the door to the east range. Below the kitchens are vaulted cellars, containing a blocked-up postern gate through the courtyard wall. Above, a long gallery occupied the second floor, although only the lower walls of the gallery survive. The west range The west range was entirely rebuilt by the Gilmours, in the 1660s, to provide a spacious suite of modern accommodation, to suit Sir John's position as a senior judge. The roof slates were brought in 1661 from