Re-orgainised state machine task work