change category selector into a directive