New way to define state class with all data