added state framework
added state framework
finished state framework
finished state framework
progress.....
basic version working