refactor pagination html