worked on category functions