abstract a partion for the categories
Merge pull request #22 from chandracarney/refactors

abstract a partion for the categories