correct behaviour of subscription mechanism for categories. coded and refactored .