implements graph listener and fixed reset index on answer CategoryIndexTest