changes at paginate and layout