added state selection and better labeling