the states method returns all defined states
Convert to oneliner suggested by @sci-phi.