edited extract int
main now prints all states and their transitions