enclosure function