add method to fetch state