newState implementation such beauty wow