assignto states
fixed segfault in run