displaying results and pagination