add state diagram