state repository purpose