created controllers and states