What are the funtions of a settlement?