centralize basic state handling