dryied sluggable code
added category generate and assign