Added a rough select categories function