fix
implement save and use proper states