add function for displaying per page