embedded and state stuff