add state to output