fix state transition bug
delete nested states
make state transition correct..wating to implement a tracking cookie