built in the shape of a gigantic cube , four hundred feet on a side , with a tower on each corner , it could house three hundred prisoners , plus the forty soldiers of the garrison and their commander , the civilian governor and his staff , and the four dozen cooks , orderlies , grooms , and other menials necessary for the running of the establishment .