add directive dispatch loop, state