added a toString method to State