exclude course catgories while finding end for courses indexing