functions of the state