get categories method