getting show hide states to work