Implementing categories functionality