cleanup, statemachine class, set date time