Added skeleton function (stateChange)