update Documentation
add state diagram