added weired event listener for category changes