add validation and page refine