state stuff, not quite fixed