Optimized isPangitigal function, now takes 1/3rd of time to complete