adding kState function