unify context and state, remove context