added state api with displayi