changed searching logic, only last levels of the category are taken into account now