optimize for page redirect
update format
print summary to console
append summary at bottom
update sample codes