first draft of state, still stuck on scheduler