Defining StateChart