hook up state selector to query, state selecting works