end state stuff