made everything replace state instead