added some new functions for excerpt and pagination