get state, view change logic