add validation and pagination