Add sample code of extended states
update version