update pagination
refactor the homepage