got category directive working, now to refactor