added further comments to paginate.php