Formatted the state chart