added -c option to extract categories only