now makes use of icatstatelistener