created a function isCurrentCatgory