refine script
Add a statistics page