added refresh and corrected paging