got basic state manager working