added pre_get_posts() function