refactoring data structurte for page
trial and error
add Use middleware function