move addStateManager to proto